<!--
 * @Author: cjj
 * @Date: 2024-11-18 14:53:02
 * @LastEditors: cjj
 * @LastEditTime: 2024-11-19 10:35:20
 * @Description: 2901545842@qq.com
-->
<script setup>
import { useRouter,useRoute } from 'vue-router'
const route = useRoute()
import { ref } from 'vue';
const value = ref('')
const router = useRouter()

function submit() {
    router.push('/scoreresult')
}   
</script>


<template>
 <div class="box">
        <div class="header">
            <p class="title">兑换成功</p>
            <span @click="router.go(-1)" class="back"><van-icon name="arrow-left" /></span>

        </div>
        <div class="content">
           <img src="https://cdn7.axureshop.com/demo/1972680/images/%E7%BB%84%E4%BB%B6_%E8%A7%84%E8%8C%83/u853.svg" alt="">
           <p>{{route.query.score}}公里={{(route.query.score / 10).toFixed(2)}}元，兑换成功!</p>
           <div class="btn-box">
            <van-button  round >我的钱包</van-button>
            <van-button @click="router.push('/marketing')" round type="primary" >继续兑换</van-button>
           </div>
        </div>
        <div class="footer">
            <p><img src="https://cdn7.axureshop.com/demo/1972680/images/%E8%BD%AC%E5%87%BA%E6%88%90%E5%8A%9F/u2782.svg" alt=""> 1. 兑换现金成功后，现金金额实时到账</p>
           <p class="p2">2. 所兑换的金额可到我的钱包中查看</p>
        </div>
        </div>
</template>

<style scoped lang="scss">
.box {
    width: 100%;
    height: 100%;

.header {
        font-size: 18px;   
        color: #fff;
        position: relative;
        background-color: rgba(22, 120, 255, 1);

        .title {
            height: 50px;
            line-height: 50px;
            text-align: center;
        }

        .back {
            position: absolute;
            top: 10px;
            left: 20px;
            font-size: 25px;
        }
    }
    .content {
        box-sizing: border-box;
        padding: 0 20px;
        height: calc(100% - 50px);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 90%;
        height: 200px;
        box-shadow: 0px 0px 16px rgba(226, 238, 255, 1);
        margin: 20px auto;
        img{
            margin-top: 20px;
        }
        p{
            margin-top: 20px;
            font-size: 14px;
        }
        .btn-box{
            width: 100%;
            display: flex;
            margin-top: 30px;
            .van-button{
                flex: 1;
                margin: 0 10px;
            }
        }
    }
    .footer{
        padding: 0 20px;
        box-sizing: border-box;
        color: #999999;
        .p2{
            padding-left: 15px;
        }
    }
}
</style>